package com.xvdong.audioplayer.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xvDong on 2025/2/11.
 */

public class RequestBody {
    private String model;
    private List<Messages> messages;
    private boolean stream;

    public String getModel() {
        return model == null ? "" : model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public List<Messages> getMessages() {
        if (messages == null) {
            return new ArrayList<>();
        }
        return messages;
    }

    public void setMessages(List<Messages> messages) {
        this.messages = messages;
    }

    public boolean isStream() {
        return stream;
    }

    public void setStream(boolean stream) {
        this.stream = stream;
    }

    public static class Messages{
        private String role;
        private String content;

        public String getRole() {
            return role == null ? "" : role;
        }

        public void setRole(String role) {
            this.role = role;
        }

        public String getContent() {
            return content == null ? "" : content;
        }

        public void setContent(String content) {
            this.content = content;
        }
    }
}
